﻿@{
    ViewBag.Title = "Assign resource";
}

<h2>@ViewBag.Title</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
  @Html.ValidationSummary(true)
  <fieldset>
    <legend>Project Resource</legend>
    <div class="editor-label">
      Role
    </div>
    <div class="editor-field">
      @Html.DropDownList("Role", (SelectList)ViewData["Roles"])
    </div>

    <div class="editor-label">
      Resource
    </div>
    <div class="editor-field">
      @Html.DropDownList("ResourceId", (SelectList)ViewData["Resources"])
    </div>

    <p>
      <input type="submit" value="Create" />
    </p>
  </fieldset>
}
<div>
  @Html.ActionLink("Back to List", "Index", new { id = ViewData["ProjectId"] })
</div>

